﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Carbon.Web.Forms;

namespace Demo.Demos
{
    public class DemoDao : IDao
    {
        private DemoDatabaseEntities m_Database = default(DemoDatabaseEntities);
        private bool m_Database_calculated = false;
        public DemoDatabaseEntities Database
        {
            get
            {
                if (!m_Database_calculated)
                {
                    m_Database = new DemoDatabaseEntities();
                    m_Database_calculated = true;
                }

                return m_Database;
            }
        }

        private bool m_Diposed = false;
        public void Dispose()
        {
            if (m_Diposed) throw new NotSupportedException("Already Disposed");

            

            m_Diposed = true;
        }
        
    }
}